//
//  HomeCell.m
//  Mtime
//
//  Created by Mac on 15/7/29.
//  Copyright (c) 2015年 wxk. All rights reserved.
//

#import "HomeCell.h"

@implementation HomeCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setModel:(HomeModel *)model {

    _model = model;
    
    _title.text = model.titleCn;
    _rating.text = [NSString stringWithFormat:@"%@",model.ratingFinal];

    [_imageVie setImageWithURL:[NSURL URLWithString:model.img]];
    
    if ([model.ratingFinal floatValue] <= 0) {
        
        _ratingView.rating = 0;
        _rating.text = @"0";
    }else {
        
        _rating.text = [NSString stringWithFormat:@"%@",model.ratingFinal];
        _ratingView.rating = [model.ratingFinal floatValue];
    }
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
